<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('统计列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">


        <div class="btn-group-sm" id="toolbar" role="group">

            <a class="btn btn-warning" onclick="$.table.exportExcel()"
               shiro:hasPermission="statistics:statistics:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('statistics:statistics:edit')}]];
    var removeFlag = [[${@permission.hasPermi('statistics:statistics:remove')}]];
    var prefix = ctx + "statistics/statistics";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "统计",
            columns: [{
                checkbox: true
            },
                {
                    field: 'id',
                    title: '',
                    visible: false
                },
                {
                    field: 'goodsId',
                    title: '设备种类'
                },
                {
                    field: 'goodsName',
                    title: '设备名称'
                },
                {
                    field: 'goodsNum',
                    title: '设备数量'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>